from flask import Flask,render_template
import sqlite3
import pymysql
app = Flask(__name__)

@app.route('/')
def index():
    return render_template("index.html")

@app.route('/zhuye')
def temp():
    return index()

@app.route('/index')
def home():
    return index()




@app.route('/score')
def score():
    return render_template("liuchengtu.html", score= score)

@app.route('/team')
def team():
    return render_template("keshihua.html")

@app.route('/movie')
def movie():
    datalist = []
    con = pymysql.connect(host="localhost",
                          port=3306,
                          user="root",
                          password="123",
                          db="keshe",
                          charset="utf8")
    cur = con.cursor()
    sql = "select * from keshe"
    cur.execute(sql)
    data =cur.fetchall()
    for item in data:
        datalist.append(item)
    cur.close()
    con.close()
    return render_template("shujuzhanshi.html", movies=datalist)



if __name__ == '__main__':
    app.run()
